def fac1(n):
    res = 1
    i = 1
    while i <= n:
        res *= i
        i += 1
    return res
def fac2 (i,l):
    res01 = 0
    while i <= l:
        res01 += fac1(i)
        i += 4
    return res01

if __name__ == '__main__':
    result = fac2(1,50)
    print(result)




